import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'
import ElementPlus from "element-plus"
import zhCn from "element-plus/es/locale/lang/zh-cn"
import "element-plus/dist/index.css"
import * as ElIconModules from '@element-plus/icons-vue'
import 'element-plus/theme-chalk/index.css';
import './assets/css/main.css'

// pinia
import { createPinia } from 'pinia'
import plugin from './store/plugin.js'
const pinin = createPinia()
pinin.use(plugin)
const app = createApp(App)


//icon
for (const iconName in ElIconModules) {
	if (Reflect.has(ElIconModules, iconName)) {
		const item = ElIconModules[iconName]
		app.component(iconName, item)
	}
}


app.use(ElementPlus, {
	locale: zhCn,
	size: "small",
	zIndex: 3000
})

app.use(router)
app.use(pinin)
app.mount('#app')


